<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/6/9
  Time: 14:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录页面</title>
    <script>
        /*点击图片刷新
        * 设置点击属性*/
        window.onload = function (ev) {
            var img = document.getElementById("code");
            img.onclick = function (ev) {
                /*缓存原因*/
                img.src = "/web/checkeCode?" + new Date().getTime();
            }
        }
    </script>
</head>
<body>
<form action="/web/login" method="post">
    用户名：<input type="text" name="username"><br>
    密码：<input type="password" name="password"><br>
    验证码：<input type="text" name="checkcode"><br>
    <img id="code" src="/web/checkeCode"><br>
    <input type="submit" name="提交">
</form>
<div>
    <%-- 获取request域 --%>
    <% String msg=(String) request.getAttribute("add_error"); %>
    <%=msg==null?"":msg%>
</div>
</body>
</html>
